package com.cn.ycy.quartz;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TestTask2 extends QuartzJobBean {

  static Logger logger = LoggerFactory.getLogger(TestTask2.class);

  @Override
  protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    logger.info("TestTask2----" + sdf.format(new Date()));
  }
}
